<%--
  Created by IntelliJ IDEA.
  User: LYK
  Date: 2017/5/5
  Time: 14:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
	<title>multiTable</title>
	<jsp:include page="/static/commonviews/header.jsp"/>
</head>
<body>
<div style="padding: 20px">
	<div id="test" style="position: relative">
		<input type="text" id="testTree" style="width: 200px">
		<div id="testSelect" style="position: absolute;width: 200px;height: 50px;border: 1px solid black;bottom: -51px;display: none"></div>
		<button onclick="onExport()">
			导出
		</button>
	</div>
	<br>

</div>


<div style="margin: 20px">
	<table id="multiTable"></table>
</div>


<jsp:include page="/static/commonviews/footer.jsp"/>

<script>
	var height = window.parent.document.getElementById('iframe_box').offsetHeight-100;
	$('#multiTable').bootstrapTable({
		url			:tsUtils.getRootPath()+'/getTableData',
		method		:'post',
		// toolbar		:'#',			//工具栏
		cache		:false,					//是否使用缓存，默认为true
		pagination	:true,					//是否分页
		sortable	:false,					//是否启用排序
		pageSize	:5,
		pageList	:[5,10,15,20,100,1000],
		height		:height,
		columns		:[
			[
				{
					'title':'多表头',
					'halign':'center',
					'align':'center',
					'colspan':6,
				}
			],
			[
				{
					field:'state',
					title:'选中',
					checkbox:true,
					valign:'middle',
					align:'center',
					colspan:1,
					rowspan:2
				},
				{
					field:'name',
					title:'test1',
					valign:'middle',
					align:'center',
					colspan:1,
					rowspan:2
				},
				{
					title:'haha',
					valign:'middle',
					align:'center',
					colspan:2,
					rowspan:1
				},
				{
					title:'hehe',
					valign:'middle',
					align:'center',
					colspan:2,
					rowspan:1
				}
			],
			[
				{
					field:'a',
					title:'testA',
					valign:'middle',
					align:'center'
				},
				{
					field:'b',
					title:'testB',
					valign:'middle',
					align:'center'
				},
				{
					field:'c',
					title:'testC',
					valign:'middle',
					align:'center'
				},
				{
					field:'d',
					title:'testD',
					valign:'middle',
					align:'center'
				}
			]
		],
	});

	$(function () {
		$('#test').blur(function () {
			alert('haha');
		})
	});

	function onExport() {
        /*tableUtils.init('multiTable');
        tableUtils.exportTableToExcel(0);*/
        SysExcel.exportExcel("多表头","multiTable",null,null);
    }

</script>
</body>
</html>
